home *** CD-ROM | disk | FTP | other *** search
- /* _chmod.c --- p 573 */
- #include <stdio.h>
- #include <io.h>
- #include <dos.h>
- main()
- {
- char filename[80], *p_fname;
- printf("Enter name of file to hide: ");
- p_fname = gets(filename);
- /* If you want to make a hidden file visible again,
- * simply change the last argument in the call to
- * _chmod to 0 */
- if (_chmod(p_fname, 1, FA_HIDDEN) == -1)
- {
- printf("Error in _chmod call!\n");
- exit(0);
- }
- printf("%s is now hidden. Try DIR to verify. \n", filename);
- }